package nz.ac.massey.doi_information_extractor.data;

import java.io.Serializable;

@SuppressWarnings("serial")
public class Settings implements Serializable {

	private String proxyAddress, databasePath, userId, userPassword;
	private int portNumber;

	public Settings() {
		this.proxyAddress = "";
		this.databasePath = "";
		this.userId = "";
		this.userPassword = "";
		this.portNumber = -1;
	}

	public Settings(String databasePath) {
		this.databasePath = databasePath;
		this.proxyAddress = "";
		this.portNumber = -1;
		this.userId = "";
		this.userPassword = "";
	}

	public Settings(String databasePath, int portNumber, String proxyAddress) {
		this.databasePath = databasePath;
		this.portNumber = portNumber;
		this.proxyAddress = proxyAddress;
		this.userPassword = "";
		this.userId = "";
	}

	public Settings(String databasePath, int portNumber, String proxyAddress,
			String userId, String userPassword) {
		this.databasePath = databasePath;
		this.portNumber = portNumber;
		this.proxyAddress = proxyAddress;
		this.userId = userId;
		this.userPassword = userPassword;
	}

	public String getProxy() {
		return proxyAddress;
	}

	public void setProxy(String proxyAddress) {
		this.proxyAddress = proxyAddress;
	}

	public int getPort() {
		return portNumber;
	}

	public void setPort(int portNumber) {
		if (portNumber > 0 && portNumber < 65536)
			this.portNumber = portNumber;
	}

	public String getDatabasePath() {
		return databasePath;
	}

	public void setDatabasePath(String databasePath) {
		this.databasePath = databasePath;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

}
